require_relative 'report'

class PlainReport

  def initialize report_base
     @report = Report.new report_base, self
  end

  def output_start
    puts "Report"
  end
  def output_head
  end

  def output_body_start
  end

  def output_body
    puts "Players which participated in a game:"
    @report.report_base.players.each do |player|
      puts player.name
    end
    puts "Number of rounds played: #{@report.report_base.no_of_rounds}"
    puts "Results: "
    @report.report_base.results.each do |name, resultss|
      puts "#{name} won #{@report.report_base.results[name].length} times with these cards: #{resultss}"
    end
    puts "Number of cards in Deck: #{@report.report_base.deck.no_of_cards}"
    puts "Card values in Deck: #{@report.report_base.deck.to_s}"
  end

  def output_body_end
  end

  def output_end
  end

  def generate_report
    @report.generate_report
  end

end